/*
 * @Author: OreoWang
 * @Email: ihc523@163.com
 * @Date: 2022-04-11 09:30:37
 * @LastEditors: OreoWang
 * @LastEditTime: 2022-04-26 10:49:24
 * @Description: 
 */
import { Node } from 'cc';
import { Blackboard } from '../blackboard/blackboard';
import { BehaviorStatus, TBehaviorStatus } from './behavior-status';

export type TLogOptions = {
    logLoad?: boolean;
    logDestroy: boolean;

    logEnter?: boolean;
    logExit?: boolean;

    logEnable?: boolean;
    logDisable?: boolean;

    logUpdate?: boolean;
    logExecute?: boolean;
    logAbort?: boolean;
}

export interface IBehaviorTree {
    getTargetRoot(): Node | null;
    getTargetByUUID(uuid: string): Node | null;
    getTargetByPath(path: string): Node | null;
    onTick(delta: number): TBehaviorStatus;
    onRestart();
    onPause();
    onResume();
    onFinished();
    onStop();
    
    deltaTime: number;
    duration: number;
    logOptions: TLogOptions;
    
    blackboard: Blackboard;
    status: BehaviorStatus;
    isSuspended: boolean;
    isCompleted: boolean;
    
    startWhenEnabled: boolean;
    pauseWhenDisabled: boolean;
    restartWhenComplete: boolean;
    resetValuesOnRestart: boolean;
    logTaskChanges: boolean;
}